#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
	int n;
	cin >> n;
	while (n--)
	{
		double sum = 0;
		int m;
		cin >> m;
		int flag = 1;
		for (int i = 1; i <= m; i++)
		{
			sum += (flag)*1.0 / i;
			flag *= -1;
		}
		cout << fixed << setprecision(2) << sum << endl;
	}
	return 0;
}